<ion-header>
  <h3 class="head_tit_h3">矿池</h3>
</ion-header>
<ion-content>

  <ion-refresher color="white" slot="fixed" (ionRefresh)="doRefresh($event)">
    <ion-refresher-content color="white"
      refreshingText="刷新中...">
    </ion-refresher-content>
  </ion-refresher>

  

  <div class="w96 p_bm5 fixed-box">
     <!-- 硬件收益(金币) -->
      <div class="box_ipfs">
        <div class="pool_bg">
        <div class="pool_one">
          <h3>
            <img src="assets/img/rmb.png" alt="" style="width: 3.5rem;">
            <span *ngIf="userInfo">{{userInfo.coin}}</span>
          </h3>
          <p>可用资产(金币)</p>
        </div>

        <ul class="po2_ul df_ja">
          <li [routerLink]="['/recharge']">充值</li>
          <li (click)="onWithdraw()">提现</li>
          <li [routerLink]="['/transfer']">转账</li>
          <li [routerLink]="['/record']">记录</li>
        </ul>
        </div>
      <div>
      <ion-segment (ionChange)="ontabs(segmentAModel)" color="onbottom" [(ngModel)]="segmentAModel" mode="md">
        <ion-segment-button value="s1" [ngClass]="{segup: segmentAModel == 's1'}">
          <ion-label>IPFS</ion-label>
        </ion-segment-button>
        <ion-segment-button value="s2" [ngClass]="{segup: segmentAModel == 's2'}">
          <ion-label>Chia</ion-label>
        </ion-segment-button>
        <ion-segment-button value="s3" [ngClass]="{segup: segmentAModel == 's3'}">
          <ion-label>Swarm</ion-label>
        </ion-segment-button>
      </ion-segment>
      </div>
    </div>

    <div class="segment_con">
      <ion-slides #slidesa (ionSlideDidChange)="slideChange()" style="height: 100%;overflow: hidden;">
        <ion-slide>
          <div class="segment_div">
            <!-- 挖矿收益(FIL) -->
            <div class="h_title">
              <span class="s_span">挖矿收益(FIL)</span>
              <div class="s_more" style="float: right;">
                硬件服务费: <i *ngIf="fildetails">{{fildetails.manageCostRatio * 100}}</i>%FIL
              </div>
            </div>

            <div class="pool_bg">
              <div class="pool_one">
                <h3>
                  <img src="assets/img/file.png" alt="">
                  <span *ngIf="fildetails">{{fildetails.usableCoin}}</span>
                </h3>
                <p>可用资产(FIL)</p>
                <p>已缴质押FIL：<span *ngIf="fildetails">{{fildetails.pledge}}个</span></p>
                <img (click)="isqb()" class="wallet" src="assets/img/wallet.png" alt="">
              </div>

              <div>
                <ul class="po_ul">
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po1.png" alt="">
                      <span>今日新增收益(FIL)</span>
                    </div>
                    <p *ngIf="fildetails">{{fildetails.toDayTotal}} FIL</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po2.png" alt="">
                      <span>FIL释放余额/25%</span>
                    </div>
                    <p *ngIf="fildetails">{{(+fildetails.freedCoin).toFixed(8)}} FIL</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po3.png" alt="">
                      <span>FIL锁仓余额/75%</span>
                    </div>
                    <p *ngIf="fildetails">{{(+fildetails.lockCoin).toFixed(8)}} FIL</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po4.png" alt="">
                      <span>伞下收益</span>
                    </div>
                    <p *ngIf="fildetails">{{fildetails.salesCoin}} FIL</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po5.png" alt="">
                      <span>今日单T产出</span>
                    </div>
                    <p *ngIf="fildetails">{{fildetails.yieldRate}} FIL/T</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po6.png" alt="">
                      <span>算利持有数</span>
                    </div>
                    <p *ngIf="fildetails">{{fildetails.userStorage}} Tib</p>
                  </li>
                </ul>
              </div>
              
            </div>

            <div class="pool_bg">
              <div class="pool_bot df_ja">
                <p>今日收益(金币)：<i *ngIf="incometoday">{{incometoday.fil.todayTotal}}</i></p>
                <p [routerLink]="['/mine/mymill']" [queryParams]="{name:'fil'}" >IPFS矿工详情 ></p>
              </div>

              <ul class="po3_ul df_ja" *ngIf="incometoday.fil">
                <li>
                  <p>{{incometoday.fil.share}}</p>
                  <p>分享收益</p>
                </li>
                <li>
                  <p>{{incometoday.fil.hardwareDividend}}</p>
                  <p>矿工收益</p>
                </li>
                <li>
                  <p>{{incometoday.fil.coach}}</p>
                  <p>辅导收益</p>
                </li>
                <li>
                  <p>{{incometoday.fil.partner}}</p>
                  <p>合伙人收益</p>
                </li>
              </ul>
            </div>
          </div>
        </ion-slide>
  
        <ion-slide>
          <div class="segment_div">
            <div class="h_title">
              <span class="s_span">挖矿收益(XCH)</span>
              <div class="s_more" style="float: right;">
                硬件服务费: <i *ngIf="xchdetails">{{xchdetails.manageCostRatio * 100}}</i>%XCH
              </div>
            </div>

            <div class="pool_bg">
              <div class="pool_one">
                <h3>
                  <img src="assets/img/xch.png" alt="">
                  <span *ngIf="xchdetails">{{xchdetails.usableCoin}}</span>
                </h3>
                <p>可用资产(XCH)</p>
                <img (click)="isqba()" class="wallet" src="assets/img/wallet.png" alt="">
              </div>

              <div>
                <ul class="po_ul">
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po0.png" alt="">
                      <span>累计产出(XCH)</span>
                    </div>
                    <p *ngIf="xchdetails">{{xchdetails.totalOutput}} XCH</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po1.png" alt="">
                      <span>今日产出(XCH)</span>
                    </div>
                    <p *ngIf="xchdetails">{{xchdetails.toDayCoin}} XCH</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po4.png" alt="">
                      <span>伞下收益(XCH)</span>
                    </div>
                    <p *ngIf="xchdetails">{{xchdetails.salesCoin}} XCH</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po6.png" alt="">
                      <span>存储算力持有数</span>
                    </div>
                    <p *ngIf="xchdetails">{{xchdetails.userStorage}} Tib</p>
                  </li>
                </ul>
              </div>
              
            </div>

            <div class="pool_bg">
              <div class="pool_bot df_ja">
                <p>今日收益(金币)：<i *ngIf="incometoday">{{incometoday.xch.todayTotal}}</i></p>
                <p [routerLink]="['/mine/mymill']" [queryParams]="{name:'xch'}" >CHIA矿工详情 ></p>
              </div>

              <ul class="po3_ul df_ja" *ngIf="incometoday">
                <li>
                  <p>{{incometoday.xch.share}}</p>
                  <p>分享收益</p>
                </li>
                <li>
                  <p>{{incometoday.xch.hardwareDividend}}</p>
                  <p>矿工收益</p>
                </li>
                <li>
                  <p>{{incometoday.xch.coach}}</p>
                  <p>辅导收益</p>
                </li>
                <li>
                  <p>{{incometoday.xch.partner}}</p>
                  <p>合伙人收益</p>
                </li>
              </ul>
            </div>
          </div>
        </ion-slide>

        <ion-slide>
          <div class="segment_div">
            <div class="h_title">
              <span class="s_span">挖矿收益</span>
            </div>

            <div class="pool_bg">
              <div class="pool_one">
                <h3>
                  <img src="assets/img/swarmc.png" alt="">
                  <span *ngIf="bzzdetails">{{bzzdetails.usableCoin}}</span>
                </h3>
                <p>累计产票(张)：<span *ngIf="bzzdetails">{{bzzdetails.totalOutput}}</span></p>
                <p>今日产票(张)：<span *ngIf="bzzdetails">{{bzzdetails.toDayCoin}}</span></p>
                <img [routerLink]="['/nodelist']" class="wallet" src="assets/img/wallet1.png" alt="">
              </div>

              <div>
                <ul class="po_ul">
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po8.png" alt="">
                      <span>节点持有总数</span>
                    </div>
                    <p *ngIf="bzzdetails">{{bzzdetails.userStorage}} 个</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po8.png" alt="">
                      <span>未分配地址节点</span>
                    </div>
                    <p *ngIf="bzzdetails">{{bzzdetails.notActiveUserStorage}} 个</p>
                  </li>
                  <li class="df_ja">
                    <div class="df_ja">
                      <img src="assets/img/po8.png" alt="">
                      <span>已分配地址节点</span>
                    </div>
                    <p *ngIf="bzzdetails">{{bzzdetails.activeUserStorage}} 个</p>
                  </li>
                </ul>
              </div>
              
            </div>

            <div class="pool_bg">
              <div class="pool_bot df_ja">
                <p>今日收益(金币)：<i *ngIf="incometoday">{{incometoday.bzz.todayTotal}}</i></p>
                <p [routerLink]="['/mine/mymill']"  [queryParams]="{name:'bzz'}">SWARM矿工详情 ></p>
              </div>

              <ul class="po3_ul df_ja" *ngIf="incometoday.bzz">
                <li>
                  <p>{{incometoday.bzz.share}}</p>
                  <p>分享收益</p>
                </li>
                <li>
                  <p>{{incometoday.bzz.hardwareDividend}}</p>
                  <p>矿工收益</p>
                </li>
                <li>
                  <p>{{incometoday.bzz.coach}}</p>
                  <p>辅导收益</p>
                </li>
                <li>
                  <p>{{incometoday.bzz.partner}}</p>
                  <p>合伙人收益</p>
                </li>
              </ul>
            </div>
          </div>
        </ion-slide>
  
      </ion-slides>
    </div>

    

  </div>

</ion-content>
